<?php
	function checkPerm($perm) {
		 $chmod = substr(sprintf('%o', fileperms($perm)), -4);
		 if($chmod == '0644' OR $chmod == '666' OR $chmod == '777' OR $chmod == '764') {
			 $icon = '<img src="../_images/icons/tick.png" style="float:left;" alt="" />';
		 } else {
			 $icon = '<img src="../_images/icons/cross.png" style="float:left;" alt="" />';
		 }
		 echo $icon.$chmod;
	}
?>
<!-- #first_step -->
<div id="first_step">
	<div class="form">
		<table cellpadding="2" cellspacing="1" class="table" style="width:95%;">
			<tr>
				<td colspan="2" class="td_content">
					<p>
						Welcome to the Installation of HYbridCMS. Your Free Aion Adminpanel.<br />
						Thanks for Supporting us. <br /><br />
						If u have some Questions please contact <a href="mailto:ntrambauer@gmail.com">ntrambauer@gmail.com</a> or visit <a href="http://in-Zane.de" target="_blank">www.in-Zane.de</a><br />
						<br />
						We hope you enjoy this Product. 
						<br /><br />
						Some Features:
						<br />
						- Character View<br />
						- Donation System<br />
						- Shop Management<br />
						- Criminal Report<br />
						- Gamemaster Logs<br />
						- much more
					</p>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="td_title">CHMod Check!</td>
			</tr>
			<tr>
				<td colspan="2" class="td_content">
					<p>
						<table cellpadding="2" cellspacing="1" class="table" style="width:95%;">
							<tr>
								<td class="td_title" colspan="2">Folders!</td>
							</tr>
							<tr>
								<td class="td_content" style="border-right:1px solid #cccccc;"><img src="../_images/icons/folder.png"  style="float:left;"/>install</td>
								<td class="td_content"><?php checkPerm('../install'); ?></td>
							</tr>
							<tr>
								<td class="td_content" style="border-right:1px solid #cccccc;"><img src="../_images/icons/folder.png"  style="float:left;"/>_libs/Smarty</td>
								<td class="td_content"><?php checkPerm('../_libs/Smarty'); ?></td>
							</tr>
							<tr>
								<td class="td_content" style="border-right:1px solid #cccccc;"><img src="../_images/icons/folder.png"  style="float:left;"/>_templatesc</td>
								<td class="td_content"><?php checkPerm('../_libs/Smarty'); ?></td>
							</tr>
							<tr>
								<td class="td_title" colspan="2">Files!</td>
							</tr>
							<tr>
								<td class="td_content" style="border-right:1px solid #cccccc;"><img src="../_images/icons/application.png"  style="float:left;"/>install/mysql.php</td>
								<td class="td_content"><?php checkPerm('../_libs/mysql.php'); ?></td>
							</tr>
							<tr>
								<td class="td_content" style="border-right:1px solid #cccccc;"><img src="../_images/icons/application.png"  style="float:left;"/>install/config.php</td>
								<td class="td_content"><?php checkPerm('../_libs/config.php'); ?></td>
							</tr>
						</table>
					</p>
				</td>
			</tr>
		</table>           

	</div>      <!-- clearfix --><div class="clear"></div><!-- /clearfix -->
	<a href="?i=step2"><input class="submit" type="button" name="submit_first" id="submit_first" value="" /></a>
</div>      <!-- clearfix --><div class="clear"></div><!-- /clearfix -->